package com.example.iot.controller;

import com.example.iot.entity.DeviceArchives;
import com.example.iot.entity.Patch;
import com.example.iot.service.impl.DeviceArchivesServiceImpl;
import com.example.iot.service.impl.PatchServiceImpl;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/patch")
@RequiredArgsConstructor
@Component
public class PatchController {
    private final PatchServiceImpl patchService;
    @GetMapping("/selectall")
    public List<Patch> selectAll() {
        List<Patch> list = patchService.selectAll();
        return list;
    }
}
